<?php
$ArCancelledCalledList = Dracosys::getSessionValue(SESSION_INTERFACE, 'CalledList');
if( !empty($ArCancelledCalledList) ):
    foreach ($ArCancelledCalledList as $Id => $Chamado):
        $class = $Chamado->is2DaysWithoutAnswer() ? 'withoutAnswer' : '';
        ?>
        <tr class="<?= $class ?>" id="CancelledCalledList_Ref<?= $Chamado->getIDChamado() ?>">
            <td><?= $Chamado->getStTitulo() ?></td>
            <td>
                <?php
                if($Chamado->hasResponsible()):
                    echo $Chamado->getFuncionario()->getArDadosUsuario('StNome');
                else:
                    echo DRA_DEFAULT_USERNAME;
                endif;
                ?>
            </td>
            <td><?= $Chamado->getSetor()->getStNome() ?></td>
            <td><?= $Chamado->getCliente()->getCustomerName() ?></td>
            <td><?= datetimeBDtoBR( $Chamado->getDtCriacao() ) ?></td>
            <td><a href="<?=DRA_URL?>atendimento/visualizar-chamado/id/<?= $Chamado->getIDChamado() ?>"><img src="<?=DRA_VIEW_URL?>images/descricao.png" alt="Visualizar Chamado" title="Visualizar Chamado" /></a></td>
        </tr>
<?php
    endforeach;
else:
?>
    <tr class="nodata">
        <td colspan="6">
            Nenhum resultado foi encontrado!
        </td>
    </tr>
<?php
endif;
?>